#include "classObject.h"


using namespace reflect;


bool ClassObject::call(const string & methodName)
{
    ClassMethod * classMethod = Singleton<ClassFactory>::getInstance().getClassMethodFromName(m_className);
    if(classMethod == nullptr) return false;
    size_t funcPtr = classMethod->getMethodPtrFromName(methodName);
    if(funcPtr == (size_t)-1) return false;	
    typedef function<void(decltype(this))> method;
    (*(method*)funcPtr)(this);
    return true;
}





